<#assign contextPath=springMacroRequestContext.getContextPath() />
<#import "/public/frame/main.html" as frame />
<@frame.head "南航明珠商城-商品列表">
</@frame.head>
<link rel="stylesheet" type="text/css" href="${contextPath}/resources/css/search_table.css" />
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 后台管理中心 <span class="c-gray en">&gt;</span>特约商户 <span class="c-gray en">&gt;</span> 焦点图管理 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">

    <div class="cl pd-5 bg-1 bk-gray mt-20"> 
      <span class="l">
     <a href="javascript:;" onclick="add()" class="btn btn-primary radius"> 新增</a> 
    </span>
    <table class="table table-border table-bordered table-bg">
	<#list movePicList as mp>
	    <tr  align="center">
	    	<td>
	    		<img id="${mp.id}" src="${mp.picUrl}" width="250" height="90" />
	    	</td>
	    	<td class="order_btn">
	    		<input class="btn btn-primary radius" name="${mp.ID}" type="button" onclick="edit('${mp.ID}')" value="修改"/>
	    		<input class="btn btn-primary radius" name="${mp.ID}" type="button" onclick="del('${mp.ID}')" value="删除"/>
	    	</td>
	    	<td></td>
	    </tr>
	    <tr><td colspan="2"><label >图片链接地址 ${mp.webPicPath}</label></td></tr>
	    <tr  style="height: 20px;"/>
	</#list> 

    </table>
    <div id="biuuu_city" style="padding-top: 10px;float: right"></div>
</div>
<@frame.end "default">
</@frame.end>

<script type="text/javascript" src="${contextPath}/resources/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/laypage/laypage.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/order/search_order_list.js"></script>
<script type="text/javascript">
var path="${contextPath}";

function add(){
	layer_show('添加焦点图',path+'/movePic/movePic_toadd','900','750');
}

function edit(id){
	layer_show('焦点图编辑',path+'/movePic/movePic_toedit?id='+id,'900','750');
}
function del(id){
	if(confirm("确定删除吗")){
		var url = path+"/movePic/movePic_delete";
		   $.ajax({
			   url : url,
		   	   type : "post",
		   	   dataType : "text",
		   	   data : {"id":id},
		   	   success : function(msg){
	        		if(msg == "200"){
	                    layer.msg('删除成功!',{icon:1,time:1000},function(){
	                        window.location.reload();
	                    });
	 				}else if(message == "500"){
	 					layer.alert("系统繁忙！");
	 				}else{
	 					layer.alert(message);
	 				}
		   	  },
			  error : function(){
				  layer.alert("删除失败");
			  }
		   });
	   }
}
</script>
</body>

</html>
 
